package com.zhuqi.wx.pay.service.impl;

import cn.hutool.core.lang.Console;
import com.zhuqi.wx.pay.service.WxPayService;
import com.zhuqi.wx.vo.WxPayOrderNotifyResultVo;
import org.springframework.stereotype.Component;

/**
 * @author : ZhuQi
 * @version : 时间:2021/12/7 14:56 版本:
 * @description : 微信支付服务层
 */
@Component
public class WxPayServiceImpl implements WxPayService {
    /**
     * 支付接口
     *
     * @return
     */
    @Override
    public WxPayOrderNotifyResultVo pay() {
        Console.log("调用微信支付");
        return new WxPayOrderNotifyResultVo();
    }

    /**
     * 解析微信回掉数据
     *
     * @param data 数据
     * @return vo
     */
    @Override
    public WxPayOrderNotifyResultVo parseOrderNotifyResult(String data) {
        WxPayOrderNotifyResultVo success = new WxPayOrderNotifyResultVo().success();
        success.setData(data);
        return success;
    }
}
